package de.szut.ita13.sommerfeld.loganalyser;

public class Date {

	private int day;
	private String month;
	private int year;
	private int hour;
	private int minute;
	private int second;
	
	public Date(int day, String month, int year, int hour, int minute, int second) {
		this.day = day;
		this.month = month;
		this.year = year;
		this.hour = hour;
		this.minute = minute;
		this.second = second;
	}
	
	public Date() {
		
	}

	public int getDay() {
		return day;
	}

	public void setDay(int day) {
		this.day = day;
	}

	public String getMonth() {
		return month;
	}

	public void setMonth(String month) {
		this.month = month;
	}

	public int getYear() {
		return year;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public int getHour() {
		return hour;
	}

	public void setHour(int hour) {
		this.hour = hour;
	}

	public int getMinute() {
		return minute;
	}

	public void setMinute(int minute) {
		this.minute = minute;
	}

	public int getSecond() {
		return second;
	}

	public void setSecond(int second) {
		this.second = second;
	}
	
	public String getDateString() {
		String hourString = (hour < 10) ? "0" + hour : String.valueOf(hour);
		String minuteString = (minute < 10) ? "0" + minute : String.valueOf(minute);
		String secondString = (second < 10) ? "0" + second : String.valueOf(second);
		return String.valueOf(day) + "/" + String.valueOf(month) + "/" + String.valueOf(year) + " - [" + hourString + ":" + minuteString + ":" + secondString + "]";
	}
}
